﻿<phone:PhoneApplicationPage
    x:Class="Knihotoc_WP8.Pages.MapPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:maps="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="{Binding Source={StaticResource CurrentSettings}, Path=BackgroundColor, Mode=TwoWay}">
        <maps:Map x:Name="map"
                      Margin="0"
                      ViewChangeEnd="map_ViewChangeEnd"
                      CredentialsProvider="AgitESoE-WMP7OgKbfqXNpt1tfpvgly0K5FJH2Pxwj_zxVYeF4tvPQgpwe19vYnK" 
                      Mode="Road" >
            <maps:Pushpin x:Name="currentPositionPushpin" />
            <maps:MapPolygon Fill="Black" Stroke="Black"
                             StrokeThickness="1"
                             Opacity="0.3"
                             x:Name="precision" />
        </maps:Map>
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="currentLocationButton" 
                                            Click="currentLocationButton_Click_1"
                                            IconUri="/Images/AppbarIcons/appbar.current.location.rest.png"
                                            Text="Button 1"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>